<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AlterTableAddShopColumn extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table("shops", function (Blueprint $table) {
            $table->unsignedInteger("startAt")->comment("营业时间")->after("updatedAt");
            $table->unsignedInteger("endAt")->comment("闭店时间")->after("startAt");
            $table->string("address", 255)->comment("详细地址")->after("imageUrl");
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('shops', function (Blueprint $table) {
            $table->dropColumn('startAt');
            $table->dropColumn('endAt');
            $table->dropColumn('address');
        });
    }
}
